package com.ts.enterprise.enums;

/**
 * @Author Dean
 * @Date 2021/10/21 14:07
 * @Description
 */
public enum PlatformEnum {
    USER("USER", "api-user"),
    ADMIN("ADMIN", "api-admin"),
    MANY_STORE("MANY_STORE", "api-store"),
    MP("MP", "api-mp");
    private final String name;
    private final String desc;
    PlatformEnum(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }
    public static PlatformEnum getName(String name) {
        PlatformEnum [] ps = PlatformEnum.values();
        for (PlatformEnum p : ps) {
            if (p.getName().equals(name)) {
                return p;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return desc;
    }
}
